From d7ee1f5383acc25010251a9943dcd2485d60452a Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Mon, 5 Mar 2007 18:54:26 +0000 Subject: [PATCH] Move ptsname module under tools/python. Signed-off-by: Keir Fraser --- tools/Makefile | 1 - tools/ptsname/Makefile | 22 ---------------------- tools/ptsname/setup.py | 11 ----------- tools/{ => python}/ptsname/ptsname.c | 0 tools/python/setup.py | 9 ++++++++- 5 files changed, 8 insertions(+), 35 deletions(-) delete mode 100644 tools/ptsname/Makefile delete mode 100644 tools/ptsname/setup.py rename tools/{ => python}/ptsname/ptsname.c (100%) diff --git a/tools/Makefile b/tools/Makefile index 77ec437689..b4156fc904 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -26,7 +26,6 @@ SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH)) SUBDIRS-y += python SUBDIRS-y += pygrub -SUBDIRS-y += ptsname endif .PHONY: all diff --git a/tools/ptsname/Makefile b/tools/ptsname/Makefile deleted file mode 100644 index a1db24c4c5..0000000000 --- a/tools/ptsname/Makefile +++ /dev/null @@ -1,22 +0,0 @@ - -XEN_ROOT = ../.. -include $(XEN_ROOT)/tools/Rules.mk - -.PHONY: all -all: build -.PHONY: build -build: - CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py build - -.PHONY: install -ifndef XEN_PYTHON_NATIVE_INSTALL -install: all - CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" -else -install: all - CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" -endif - -.PHONY: clean -clean: - rm -rf build tmp *.pyc *.pyo *.o *.a *~ a.out diff --git a/tools/ptsname/setup.py b/tools/ptsname/setup.py deleted file mode 100644 index 5fbdfecd5c..0000000000 --- a/tools/ptsname/setup.py +++ /dev/null @@ -1,11 +0,0 @@ -from distutils.core import setup, Extension - -extra_compile_args = [ "-fno-strict-aliasing", "-Werror" ] - -setup(name = 'ptsname', - version = '1.0', - description = 'POSIX ptsname() function', - author = 'Tim Deegan', - author_email = 'Tim.Deegan@xensource.com', - license = 'GPL', - ext_modules = [ Extension("ptsname", [ "ptsname.c" ]) ]) diff --git a/tools/ptsname/ptsname.c b/tools/python/ptsname/ptsname.c similarity index 100% rename from tools/ptsname/ptsname.c rename to tools/python/ptsname/ptsname.c diff --git a/tools/python/setup.py b/tools/python/setup.py index 7b25025d9d..11ef487203 100644 --- a/tools/python/setup.py +++ b/tools/python/setup.py @@ -44,7 +44,14 @@ acm = Extension("acm", libraries = libraries, sources = [ "xen/lowlevel/acm/acm.c" ]) -modules = [ xc, xs, acm ] +ptsname = Extension("ptsname", + extra_compile_args = extra_compile_args, + include_dirs = include_dirs + [ "ptsname" ], + library_dirs = library_dirs, + libraries = libraries, + sources = [ "ptsname/ptsname.c" ]) + +modules = [ xc, xs, acm, ptsname ] if os.uname()[0] == 'SunOS': modules.append(scf) -- 2.30.2